home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / BARNET / ARMLINUX / ACORN-CD-PATCH next >
Text File  |  1998-04-12  |  4KB  |  106 lines

  1.  
  2. diff -ur linux/fs/isofs/dir.c linuxn/fs/isofs/dir.c
  3. --- linux/fs/isofs/dir.c        Tue Jul 23 08:26:40 1996
  4. +++ linuxn/fs/isofs/dir.c       Sun Mar 22 17:17:08 1998
  5. @@ -104,6 +104,32 @@
  6.         return i;
  7.  }
  8.  
  9. +/* Acorn extensions written by Matthew Wilcox <willy@bofh.ai> 1998 */
  10. +int get_acorn_filename(struct iso_directory_record * de,
  11. +                          char * retname, struct inode * inode)
  12. +{
  13. +       int std;
  14. +       unsigned char * chr;
  15. +       int retnamlen = isofs_name_translate(de->name,
  16. +                              de->name_len[0], retname);
  17. +       if (retnamlen == 0) return 0;
  18. +       std = sizeof(struct iso_directory_record) + de->name_len[0];
  19. +       if (std & 1) std++;
  20. +       if ((*((unsigned char *) de) - std) != 32) return retnamlen;
  21. +       chr = ((unsigned char *) de) + std;
  22. +       if (strncmp(chr, "ARCHIMEDES", 10)) return retnamlen;
  23. +       if ((*retname == '_') && ((chr[19] & 1) == 1)) *retname = '!';
  24. +       if (((de->flags[0] & 2) == 0) && (chr[13] == 0xff)
  25. +              && ((chr[12] & 0xf0) == 0xf0))
  26. +       {
  27. +              retname[retnamlen] = ',';
  28. +              sprintf(retname+retnamlen+1, "%3.3x",
  29. +                      ((chr[12] & 0xf) << 8) | chr[11]);
  30. +              retnamlen += 4;
  31. +       }
  32. +       return retnamlen;
  33. +}
  34. +
  35.  /*
  36.   * This should _really_ be cleaned up some day..
  37.   */
  38. @@ -263,6 +289,14 @@
  39.                         continue;
  40.                 }
  41.  
  42. +               if (inode->i_sb->u.isofs_sb.s_mapping == 'a') {
  43. +                       len = get_acorn_filename(de, tmpname, inode);
  44. +                       if (filldir(dirent, tmpname, len, filp->f_pos, inode_nu
  45. mber) < 0)
  46. +                               break;
  47. +                       dcache_add(inode, tmpname, len, inode_number);
  48. +                       filp->f_pos += de_len;
  49. +                       continue;
  50. +               } else
  51.                 if (inode->i_sb->u.isofs_sb.s_mapping == 'n') {
  52.                         len = isofs_name_translate(name, len, tmpname);
  53.                         if (filldir(dirent, tmpname, len, filp->f_pos, inode_nu
  54. mber) < 0)
  55. diff -ur linux/fs/isofs/inode.c linuxn/fs/isofs/inode.c
  56. --- linux/fs/isofs/inode.c      Fri Aug 15 19:11:45 1997
  57. +++ linuxn/fs/isofs/inode.c     Sun Mar 22 16:32:10 1998
  58. @@ -78,7 +78,7 @@
  59.  {
  60.         char *this_char,*value;
  61.  
  62. -       popt->map = 'n';
  63. +       popt->map = 'a';
  64.         popt->rock = 'y';
  65.         popt->cruft = 'n';
  66.         popt->unhide = 'n';
  67. @@ -105,10 +105,11 @@
  68.                 if ((value = strchr(this_char,'=')) != NULL)
  69.                         *value++ = 0;
  70.                 if (!strcmp(this_char,"map") && value) {
  71. -                       if (value[0] && !value[1] && strchr("on",*value))
  72. +                       if (value[0] && !value[1] && strchr("ano",*value))
  73.                                 popt->map = *value;
  74.                         else if (!strcmp(value,"off")) popt->map = 'o';
  75.                         else if (!strcmp(value,"normal")) popt->map = 'n';
  76. +                       else if (!strcmp(value,"acorn")) popt->map = 'a';
  77.                         else return 0;
  78.                 }
  79.                 else if (!strcmp(this_char,"check") && value) {
  80. diff -ur linux/fs/isofs/namei.c linuxn/fs/isofs/namei.c
  81. --- linux/fs/isofs/namei.c      Tue Aug 12 22:06:35 1997
  82. +++ linuxn/fs/isofs/namei.c     Sun Mar 22 16:36:58 1998
  83. @@ -156,6 +156,9 @@
  84.                 rrflag = get_rock_ridge_filename(de, &dpnt, &dlen, dir);
  85.                 if (rrflag) {
  86.                   if (rrflag == -1) goto out; /* Relocated deep directory */
  87. +               } else
  88. +                 if(dir->i_sb->u.isofs_sb.s_mapping == 'a') {
  89. +                       dlen = get_acorn_filename(de, dpnt, dir);
  90.                 } else {
  91.                   if(dir->i_sb->u.isofs_sb.s_mapping == 'n') {
  92.                     for (i = 0; i < dlen; i++) {
  93. diff -ur linux/include/linux/iso_fs.h linuxn/include/linux/iso_fs.h
  94. --- linux/include/linux/iso_fs.h        Sat Nov 22 20:09:34 1997
  95. +++ linuxn/include/linux/iso_fs.h       Sun Mar 22 16:38:41 1998
  96. @@ -146,6 +146,7 @@
  97.  
  98.  extern char * get_rock_ridge_symlink(struct inode *);
  99.  extern int find_rock_ridge_relocation(struct iso_directory_record *, struct in
  100. ode *);
  101. +int get_acorn_filename(struct iso_directory_record *, char *, struct inode *);
  102.  
  103.  /* The stuff that follows may be totally unneeded. I have not checked to see
  104.   which prototypes we are still using.  */
  105.  
  106.